home *** CD-ROM | disk | FTP | other *** search
/ Just Call Me Internet / Just Call Me Internet.iso / prog / atari / c / mail110 / newmbox.c < prev    next >
C/C++ Source or Header  |  1994-02-11  |  991b  |  58 lines

  1. //=========================================================
  2. //
  3. //    newmbox.c
  4. //
  5. //    void newmbox(char *mbox)
  6. //
  7. //=========================================================
  8.  
  9. // $Id: newmbox.c,v 1.3 1994/02/12 01:28:10 gbj Exp user $
  10.  
  11. /*
  12. $Log: newmbox.c,v $
  13.  * Revision 1.3  1994/02/12  01:28:10  gbj
  14.  * Removed index display as main() now does it.
  15.  *
  16.  * Revision 1.2  1994/02/08  23:33:54  gbj
  17.  * First public release.
  18.  *
  19.  * Revision 1.1  1994/02/08  03:16:14  gbj
  20.  * Initial revision
  21.  *
  22. */
  23.  
  24. #include "mailer.h"
  25.  
  26. void newmbox(char *mbox)
  27. {
  28.     char tbox[128];
  29.     int res;
  30.     
  31.     strcpy(tbox, mailpath);
  32.     strcat(tbox, "\\");
  33.     strcat(tbox, mbox);
  34.     strcat(tbox, ".txt");
  35.     
  36.     if (access(tbox, 0) == 0)
  37.     {
  38.         cmsg=-1;
  39.         maxmsgno=-1;
  40.         res=loadix(mbox);
  41.         if (res == 3)
  42.         {
  43.             fprintf(stderr, "newmbox: loadix returned %d\n", res);
  44.             return;
  45.         }            
  46.         if (res == 1 || res == 2)
  47.         {
  48.             cmsg=-1;
  49.             maxmsgno=-1;
  50.         }
  51.         else
  52.         {
  53.             cmsg=0;
  54.         }
  55.     }
  56.     return;
  57. }
  58.